package com.java.multipledatasource.spring.test;

/**
 * @author hu
 * @version 1.0
 * @date 2021/1/25 0025 下午 3:16
 * @description
 */
public class Demo01 {
    public static void main(String[] args) {
        Test01 test01 = Test01.getInstance();
        System.out.println(Test01.val1);
        System.out.println(Test01.val2);
    }

}

class  Test01 {
    public static int val1;
    public static int val2 = 1;

    public static Test01 instance = new  Test01();

    public Test01() {
        val1++;
        val2++;
    }

    public static Test01 getInstance(){
        return instance;
    }
}
